package com.ocp.socket.busi.milkCleanStat.mapper;

import com.ocp.socket.busi.milkCleanStat.bean.BaseMilkCleanStat;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


/**
 * @Author : zhangzh
 * @description :
 * @Date Create in 13:28 2019/3/9
 * @Modified By :
 **/
@Mapper
public interface BaseMilkCleanStatMapper {


    /***
     * 插入挤奶清洗状态表
     * @param baseMilkCleanStat
     * @return
     */
    int insertBaseMilkCleanStat(BaseMilkCleanStat baseMilkCleanStat);

    /****
     * 根据奶厅ID查询当前挤奶清洗状况
     * @param milkHallId
     * @return
     */
    BaseMilkCleanStat getMilkCleanLineCodeByHallId(@Param("milkHallId") Integer milkHallId);

    /****
     * 根据奶厅ID查询当前值
     * @param milkHallId
     * @return
     */
    String getMilkCleanStatByHallIdAndLineCode(@Param("milkHallId") Integer milkHallId,@Param("typeCode") String typeCode,@Param("lineCode") String lineCode);



    /*******
     * 根据奶厅ID和时间段 获取冷水和热水的阀门开合状态
     * @param milkHallId
     * @param startTime
     * @param endTime
     * @return
     */
    int getValvByHallIdAndTime(@Param("milkHallId") Integer milkHallId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("l01Val") String l01Val,@Param("l02Val") String l02Val);

    /*********
     * 根据奶厅ID和时间段 获取挤奶的状况
     * @param milkHallId
     * @param startTime
     * @param endTime
     * @return
     */
    int getCleanByHallIdAndTime(@Param("milkHallId") Integer milkHallId,@Param("startTime") String startTime,@Param("endTime") String endTime);
}
